<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo ($title); ?></title>
<script type="text/javascript" src="../Public/js/jq.js"></script>
<script>
function check()
{
	s='';
	if($("#title").val() == '') s+='请输入院校名称\n';
	$('select').each(function(){
		if($(this).val()== '-1')
			{
			
			s +=$(this).children().eq(0).text()+'\n';
			}
	})
	
	if(s!='')
		{
		alert(s);
		return false;
		}
	
}

$().ready(function(){
	_attach = '<?php echo ($cnt["attach"]); ?>'.split(',');
	for(i in _attach)
	{
		if(_attach[i] == '1')
		{
			$('#985').attr('checked','checked');			
		}else if(_attach[i] == '2')
		{
			$("#211").attr('checked','checked');
		}else if(_attach[i] == '3')
		{
			$('#yjs').attr('checked','checked');
		}
	}
	
})

</script>
</head>
<body>
<div class="addschoolItem">
<form action="__URL__/addschoolitem/" method="post"
	onsubmit="return check()"><?php if(isset($cnt)): ?><input
	type="hidden" value='<?php echo ($cnt["id"]); ?>' name="id" /><?php endif; ?>
<p>院校名称：<input type="text" name="title" id="title"
	value="<?php echo ($cnt["title"]); ?>" /> 院校所在地：<select name="address">
	<option value="-1">请选择所在地</option>
	<?php if(is_array($syssetting["0"])): $i = 0; $__LIST__ = $syssetting["0"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"<?php if(($cnt["address"])  ==  $key): ?>selected="selected"<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>

</select></p>
<p>学历层次:<select name="education">
	<option value="-1">请选择学历层次</option>
	<?php if(is_array($syssetting["1"])): $i = 0; $__LIST__ = $syssetting["1"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"<?php if(($cnt['education'])  ==  $key): ?>selected="selected"<?php endif; ?>
	><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select> 院校隶属： <select name="belonging">
	<option value="-1">请选择院校隶属</option>
	<?php if(is_array($syssetting["2"])): $i = 0; $__LIST__ = $syssetting["2"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"<?php if(($cnt["belonging"])  ==  $key): ?>selected="selected"<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select> 办学类型： <select name="schooltype">
	<option value="-1">请选择办学类型</option>
	<?php if(is_array($syssetting["3"])): $i = 0; $__LIST__ = $syssetting["3"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"<?php if(($cnt["schooltype"])  ==  $key): ?>selected="selected"<?php endif; ?> ><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select></p>

<p>院校类型： <select name="typeofinstitution">
	<option value="-1">请选择院校类型</option>
	<?php if(is_array($syssetting["4"])): $i = 0; $__LIST__ = $syssetting["4"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"<?php if(($cnt["typeofinstitution"])  ==  $key): ?>selected="selected"<?php endif; ?> ><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select> 联系电话：<input type="text" name="telephone" value="<?php echo ($cnt["telephone"]); ?>" />
院校地址：<input type="text" name="postal" value="<?php echo ($cnt["postal"]); ?>" />
 院校特色：<input	type="checkbox" name="attach[]" value="2" id='211' />211 
<input	type="checkbox" name="attach[]" value="1" id='985' />985 
<input	type="checkbox" name="attach[]" value="3" id='yjs' />研究生院</p>
<p><input type="submit" <?php if(isset($cnt)): ?>value="保存" <?php else: ?> value="添加"<?php endif; ?> /><input type="reset" value="重置" /></p>

</form>
</div>
</body>
</html>